<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<div id="app">
    <ul>
        <li v-for="item in name">{{item}}</li>
    </ul>

    <!--遍历过程中 获取索引-->

    <ul>
        <li v-for="(item,index) in name">{{index+1}}  {{item}}</li>
    </ul>
</div>
<!-- vue js库-->
<script src="../vue.js"></script>

<script>

    var app = new Vue({
        el: '#app',
        data: {
            message: 'Hello Vue!',
            name: ['张三','李四']
        }
    })
</script>
</body>
</html>